Media streaming from a server to client involves transmission of a stream of messages, preceded by a set-up phase, in which the client sends a commands to start the stream and the client and server set up parameters that are needed for the transmission. To the user, the set-up phase appears as a slow response that delays the start of service. This is especially so when roundtrip transmission via a wireless network are needed. Therefore it is desirable to reduce the duration of the set-up phase as much as possible.
According to the IETF RTSP protocol described in RFC2326bis, the set-up phase involves one or more “set-up” commands transmitted via the network from a client device to a server device, with a reply from the server device to the client device, followed by a play command from the client device. In addition a “describe” command may be needed, to obtain further parameters.
To speed up the set-up phase, pipelining of the commands may be used. This involves transmitting commands before replies to the preceding commands have been received, but this is not possible when a command depends on information from a reply to a preceding command.
Further delay can occur when the client device is “visible” on the network only via a firewall or a network address translator (NAT). In this case the client device cannot specify its own address, or even which of its ports data must be addressed from the stream output port(s) of the server device. To solve this problem the client devices sends discovery messages to the stream output ports of the server device through the firewall or network address translator. This enables the server device to recover the necessary address from the source address of these discovery messages, including an identification of the port if necessary. The need for an additional discovery message increases the set-up delay. The increased delay can be significant because the address discovery introduces a dependency between commands that limits the possibility of pipelining. Moreover, plurality of discovery messages may be needed in the case of lost traffic.